<template>
	<el-dialog @close="dialogVisible = false" v-model="dialogVisible" title="个人信息" width="500px" draggable>
		<el-descriptions :column="1" border title="">
			<el-descriptions-item label="用户姓名">{{ globalStore.userInfo.userName }}</el-descriptions-item>
			<el-descriptions-item label="所属商户">{{
				globalStore.userInfo.companyInfo ? globalStore.userInfo.companyInfo.companyName : "平台端"
			}}</el-descriptions-item>
			<el-descriptions-item label="用户角色">{{ globalStore.userInfo?.roleInfo?.roleName || "无" }}</el-descriptions-item>
			<el-descriptions-item label="联系电话">{{ globalStore.userInfo.userTel }}</el-descriptions-item>
		</el-descriptions>
		<!-- <template #footer>
			<span class="dialog-footer">
				<el-button @click="dialogVisible = false">取消</el-button>
				<el-button type="primary" @click="dialogVisible = false">确认</el-button>
			</span>
		</template> -->
	</el-dialog>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { GlobalStore } from "@/stores";
const dialogVisible = ref(false);
const globalStore = GlobalStore();
// openDialog
const openDialog = () => {
	dialogVisible.value = true;
};

defineExpose({ openDialog });
</script>
